
document.addEventListener("visibilitychange", function () {
    // console.log( document.visibilityState );
    // console.log(document.hidden);
    if (!document.hidden) {
        location.reload()
    }
});
var ipt = document.getElementById("sousuo")
document.onkeydown = function (event) {
    var e = event || window.event;
    if (e && e.keyCode == 13) {
        var reg = /^[\s\S]*.*[^\s][\s\S]*$/;
        if (reg.test(ipt.value)) {
            window.open("https://www.baidu.com/s?ie=UTF-8&wd=" + ipt.value)
        }

    }
}

